#有下列人员数据库，请按要求实现
#姓名  年龄  性别  编号  任职公司  薪资  部门编号
# names = [
#     ["曹操","56","男","106","IBM", 500 ,"50"],
#     ["大乔","19","女","230","微软", 501 ,"60"],
#     ["小乔", "19", "女", "210", "Oracle", 600, "60"],
#     ["许褚", "45", "男", "230", "Tencent", 700 , "10"]
#     ]
# a = 0
# b = 0
# d = {}
# for i in range(0,4) :
#     a += names[i][5]
#     b += int(names[i][1])
#     d[i] = names.count(i)
# c = ["刘备","45","男","220","alibaba",500,"30"]
# names.append(c)
# print("每个人的平均薪资为:",a/4)
# print("每个人的平均年龄为:",b/4)
# print("names =",names)
# print(d)





# # 现在魔法学院有赫敏、哈利、罗恩、马尔福四个人的几次魔法作业的成绩。但是呢，因为有些魔法作业有一定难度，教授不强制同学们必须上交，所以大家上交作业的次数并不一致。
# names =[
#     ["罗恩", 23 ,35 ,44],
#     ["哈利" ,60, 77 ,68 ,88, 90],
#     ["赫敏", 97 ,99 ,89 ,91, 95, 90],
#     ["马尔福",100, 85 ,90]
#     ]
# a = names[0][1] + names[0][2] + names[0][3]
# b = names[1][1] + names[1][2] + names[1][3] + names[1][4] + names[1][5]
# c = names[2][1] + names[2][2] + names[2][3] + names[2][4] + names[2][5] + names[2][6]
# d = names[3][1] + names[3][2] + names[3][3]
# print("罗恩总成绩为:",a)
# print("哈利总成绩为:",b)
# print("赫敏总成绩为:",c)
# print("马尔福总成绩为:",d)








#当输入是54321时，写出下面程序的执行结果
# num = int(input("请输入一个数:"))
# while num != 0 :
#     print(num % 10)
#     num = num // 10
# print(num)







#请对下列列表进行冒泡排序
# a=[5,2,4,7,9,1,3,5,4,0,6,1,3]
# for i in range(len(a)) :
#     for j in range(len(a)-i-1) :
#         if a[j] > a[j+1] :
#             a[j],a[j+1] = a[j+1],a[j]
# # for i in a :
# #     print(i,end = " ")
# print(a)























